package com.hqyj.shop.config;

import com.hqyj.shop.interceptor.JwtInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 项目:shop-admin-240701
 * 描述:
 * 时间:2024/10/9 13:34
 * 作者:admin
 * 版本:1.0
 **/
@Configuration
public class JwtConfig implements WebMvcConfigurer {


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //注册拦截器
        registry.addInterceptor(new JwtInterceptor())
                .addPathPatterns("/buyCar/*");
    }
}
